package com.my.test.java.two.testj;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

import com.my.test.java.two.testj.bean.DataSourceBean;

public class App {

	public static void main(String[] args) throws Exception {
		DataSourceBean bena = new DataSourceBean("jdbc:mysql://localhost:3306/test","root","","com.mysql.jdbc.Driver",3,10);
		HDataSource source = new HDataSource(bena);
		Connection conn = source.getConnection();
		PreparedStatement ps = conn.prepareStatement("select * from user_info");
		ResultSet rs = ps.executeQuery();
		while(rs.next()){
			System.out.println(rs.getString("user_name"));
		}
	}
}
